﻿using System.IO;

namespace Tavis.Tools {
    public static class MemoryStreamExtensions {

        public static string ReadAsString(this MemoryStream stream) {
            stream.Flush();
            stream.Position = 0;
            return new StreamReader(stream).ReadToEnd();
        }
    }
}
